/*
Package dao :
Copyright Huawei Corp. All Rights Reserved.
*/
package dao

import (
	"github.com/astaxie/beego/orm"
	"nft-server/model"
)

func init() {
	orm.RegisterModel(new(model.Asset))
	orm.RegisterModel(new(model.User))
	orm.RegisterModel(new(model.Role))
	//新增注册
	orm.RegisterModel(new(model.CollectionDetail))
	orm.RegisterModel(new(model.AssetRelation))
	orm.RegisterModel(new(model.Category))
	orm.RegisterModel(new(model.MetaData))
	orm.RegisterModel(new(model.Order))
	orm.RegisterModel(new(model.BurnAsset))
}

type BaseDao struct {
	O orm.Ormer
}

func (dao *BaseDao) Init() {
	dao.O = orm.NewOrm()
}
